<%@ page language="java" contentType="text/html; charset=utf8"
	pageEncoding="utf8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
<link href="//cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css"
	rel="stylesheet">
<link
	href="//cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap-theme.min.css"
	rel="stylesheet">
<script src="//cdn.bootcss.com/jquery/1.11.3/jquery.min.js"></script>
<script src="//cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.js"></script>
<script src="${pageContext.request.contextPath }/js/script.js"></script>
<link href="${pageContext.request.contextPath }/css/style.css"
	rel="stylesheet">
<meta charset="UTF-8">
<title>Audit</title>
</head>
<body class="layout-background">
	<nav class="navbar navbar-default nav-bar-top">
	<div class="layout-width">
		<div class="navbar-header">
			<a href="javascript:void(0)" class="navbar-brand">ITA Order
				System</a>
		</div>
		<!-- <div class="pull-right"
			style="font-size: 20px; position: relative; top: 10px; right: 55px;">
			<label class="control-label">Hello: </label> <a
				href="merchantHome.html">Freedy</a>

			<div style="margin-left: 70px; margin-top: -8px;">
				<a class="btn btn-danger btn-xs" href="javascript:void(0)">Logout</a>
			</div>
		</div> -->
	</div>
	</nav>
	<div id="menu-panel" class="menu-container menu-close">
		<ul style="margin-top: 30px" class="nav nav-pills nav-stacked">
<!-- 			<li style="white-space: nowrap;" role="presentation"><a
				href="./../"><span class="glyphicon glyphicon-home"></span>&nbsp;&nbsp;&nbsp;&nbsp;Home</a>
			</li> -->
			<li style="white-space: nowrap;" role="presentation"><a
				href="./../merchant/list"><span
					class="glyphicon glyphicon-check"></span>&nbsp;&nbsp;&nbsp;&nbsp;Audit
					Merchants</a></li>
			<li style="white-space: nowrap;" role="presentation" class="active">
				<a href="javascript:void(0)"><span
					class="glyphicon glyphicon-exclamation-sign"></span>&nbsp;&nbsp;&nbsp;&nbsp;Low
					Grade Merchant</a>
			</li>
			<li style="white-space: nowrap;" role="presentation"><a
				href="./../dish/list"><span class="glyphicon glyphicon-apple"></span>&nbsp;&nbsp;&nbsp;&nbsp;Audit
					Dish</a></li>
			<li style="white-space: nowrap;" role="presentation"><a
				href="./../complaint/list"><span
					class="glyphicon glyphicon-thumbs-down"></span>&nbsp;&nbsp;&nbsp;&nbsp;Complaint
					List</a></li>
		</ul>
	</div>
	<div id="operation-panel" class="operation-container">
		<div class="body-panel" style="min-height: 680px">
			<div style="width: 95%; margin: auto; position: relative;">
				<table class="table table-striped" style="width: 100%">
					<thead>
						<tr>
							<th style="text-align: center">Logo</th>
							<th style="text-align: center">Name</th>
							<th style="text-align: center">Tel</th>
							<th style="text-align: center">Grade</th>
							<th></th>
						</tr>
					</thead>
					<tbody>
						<c:forEach var="item" items="${merchantList}">
						<c:if test="${item.auditStatus != 1}">
							<tr id="lowGrade-${item.merchant.mId}">
								<td style="text-align: center; vertical-align: middle"
									width="19%"><img style="width: 95px"
									src="http://zha-ita115-w7:9000${ item.merchant.logo}"></td>
								<td style="text-align: center; vertical-align: middle"
									width="19%">${item.merchant.mName }</td>
								<td style="text-align: center; vertical-align: middle"
									width="19%">${item.merchant.mTel }</td>
								<td style="text-align: center; vertical-align: middle"
									width="19%">${item.merchant.grade}</td>

								<td style="text-align: center; vertical-align: middle"
									width="8%"><button onclick="confirmBlock('${item.merchant.mId}','lm')"
										class="btn btn-danger">Block</button></td>
							</tr>
						</c:if>
						</c:forEach>
					</tbody>
				</table>
			</div>
		</div>
	</div>
	<div class="modal fade bs-example-modal-sm" id="confirmModel"
		tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel">
		<div class="modal-dialog modal-sm">
			<div class="modal-content">
				<div class="modal-header">Warning</div>
				<div class="modal-body">Are you sure to block this merchant?</div>
				<div class="text-right"
					style="padding-right: 15px; padding-bottom: 7px;">
					<button id="confirm" class="btn btn-danger" data-dismiss="modal">
						Yes</button>
					&nbsp;&nbsp;&nbsp;
					<button class="btn btn-info" data-dismiss="modal">Cancel</button>
				</div>
			</div>
		</div>
	</div>
</body>
</html>